﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Jamhee.Noctiluca.Common;

namespace Jamhee.Noctiluca.LightWiki.Markup
{
    class MarkupStack
    {
        private Stack<IMarkupStackFlag> _stack = new Stack<IMarkupStackFlag>();

        public IMarkupStackFlag Pop()
        {
            try
            {
                return _stack.Pop();
            }
            catch
            {
                return null;
            }
        }

        public void Push(IMarkupStackFlag markupStackFlag)
        {
            _stack.Push(markupStackFlag);
        }

        public void Clear()
        {
            _stack.Clear();
        }
    }
}
